<script type="text/javascript">
        $(function () {
            $('#datetimepicker8').datetimepicker();
            $('#datetimepicker9').datetimepicker();
            $("#datetimepicker8").on("dp.change",function (e) {
               $('#datetimepicker9').data("DateTimePicker").setMinDate(e.date);
            });
            $("#datetimepicker9").on("dp.change",function (e) {
               $('#datetimepicker8').data("DateTimePicker").setMaxDate(e.date);
            });
        });
		 
</script>
<div class="bs-example">
<?php echo $this->Form->create('Question',array('class'=>'form-horizontal')); ?>
	<fieldset>
		<legend><?php echo __('Sửa câu hỏi'); ?></legend>
		
	   <div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label"> Câu hỏi</label>
			<div class="col-sm-6">
			 <?php
                                echo $this->Form->input('name', array('div'=>'clearfix',
                                    'before'=>'<label>'.__('').'</label><div class="input">',
                                    'after'=>$this->Form->error('name', array(), array('wrap' => 'p', 'class' => 'alert alert-danger')).'</div>',
                                    'error' => array('attributes' => array('style' => 'display:none')),
                                    'label'=>false, 
                                    'class'=>'xlarge',
                                    'type' => 'textarea',
                                    'cols'=>'100',
                                    'rows'=>'4'
                                                    ));
                            ?>
			</div>
	  </div>
	  <div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label">Ngày bắt đầu</label>
			<div class="col-md-5">
				<div class='input-group date' id='datetimepicker9'>
                    <input type='text' class="form-control"  name="data[Question][time_start]" value="<?php echo $this->data['Question']['time_start']?>"/>
                    <span class="input-group-addon">
						<span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>			
				
			</div>
	  </div>
	  
	  <div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label">Ngày kết thúc</label>
			<div class="col-md-5">
				<div class='input-group date' id='datetimepicker8'>
                    <input type='text' class="form-control" name="data[Question][time_end]" value="<?php echo $this->data['Question']['time_end']?>"/>
                    <span class="input-group-addon">
						<span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
			</div>
	  </div>
	  
	 <div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label"> </label>
			<div class="col-sm-4">
			<button type="submit" class="btn btn-primary"> Cập nhật</button>
                        <button type="reset" class="btn btn-danger"> Hủy</button>
                         
			<?php echo $this->Form->end(); ?>
			</div>
	  </div>
	</fieldset>

</div>

